package com.example.demo.zabbix.request.builder.discovery;

import com.example.demo.zabbix.request.BaseRequest;
import com.example.demo.zabbix.request.builder.request.UpdateRequestBuilder;

import java.util.Map;

/**
 * https://www.zabbix.com/documentation/4.0/manual/api/reference/drule/update
 */
public class DiscoveryRuleUpdateRequestBuilder extends UpdateRequestBuilder {
    private String druleId;
    public DiscoveryRuleUpdateRequestBuilder(String auth) {
        super("drule.update", auth);
    }

    public DiscoveryRuleUpdateRequestBuilder(Long id, String auth) {
        super("drule.update", id, auth);
    }

    public String getDruleId() {
        return druleId;
    }

    public DiscoveryRuleUpdateRequestBuilder setDruleId(String druleId) {
        this.druleId = druleId;
        return this;
    }

    @Override
    public BaseRequest<Map<String, Object>> builder() {
        baseRequest.getParams().put("druleid",druleId);
        return baseRequest;
    }
}
